<?php
/**
 * after complete form design platform we don't need to configure this form
 * because it will be generated from admin and cached to use later.
 */
class User_Form_Signup extends Form
{

	function init()
	{
		$this -> addChild('text', 'name', array(
			'label' => 'Name',
			'rules' => array('required'),
		));

		$this -> addChild('email', 'email', array(
			'label' => 'Email address',
			'rules' => array('required')
		));

		$this -> addChild('password', 'password', array(
			'label' => 'Password',
			'rules' => array('password'),
		));

		$this -> addChild('password', 'password2', array(
			'label' => 'Confirm password',
			'rules' => array('password2')
		));

		/**
		 * @TODO add captcha confirm here by some thing else.
		 */
		$this -> addChild('group', 'buttons');

		$this -> buttons -> addChild('submit', '_submit', array('label' => 'Signup'));
	}

}
